<!DOCTYPE html>
<html lang="en">

<head>
    <title>input</title>
    <link rel="icon" type="image/x-icon" href="./assets/favicon.ico" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
</head>

<body>


    <input type="text" id="myInput">
    <p id="result"></p>
    <script>
        document.getElementById('myInput').oninput = function() {
            var inputValue = this.value;
            document.getElementById('result').innerHTML = '您输入的内容是：' + inputValue;
        };
    </script>
</body>

</html>
